﻿using System;

using Rarous.TexyNet.Configuration;
using Rarous.TexyNet.Modules;

using Xunit;

namespace Rarous.TexyNet.Test {

  /// <summary>
  /// This is a test class for HeadingModuleTest and is intended
  /// to contain all HeadingModuleTest Unit Tests
  /// </summary>
  public class HeadingModuleTest {

    /// <summary>
    /// A test for TopTest
    /// </summary>
    [Fact]
    public void HeadingModule_Top_PropertyBehavior() {
      HeadingModule target = new HeadingModule();
      int expected = 3;
      target.Top = expected;

      Assert.Equal(expected, target.Top);
    }

    /// <summary>
    /// A test for BalancingTest
    /// </summary>
    [Fact]
    public void HeadingModule_Balancing_PropertyBehavior() {
      HeadingModule target = new HeadingModule();
      int expected = 0;
      target.Balancing = expected;

      Assert.Equal(expected, target.Balancing);
    }

    /// <summary>
    /// A test for AllowedUnderlinedTest
    /// </summary>
    [Fact]
    public void HeadingModule_AllowedUnderlined_PropertyBehavior() {
      HeadingModule target = new HeadingModule();
      bool expected = false;
      target.AllowedUnderlined = expected;

      Assert.Equal(expected, target.AllowedUnderlined);
    }

    /// <summary>
    /// A test for AllowedSurroundedTest
    /// </summary>
    [Fact]
    public void HeadingModule_AllowedSurrounded_PropertyBehavior() {
      HeadingModule target = new HeadingModule();
      bool expected = false;
      target.AllowedSurrounded = expected;

      Assert.Equal(expected, target.AllowedSurrounded);
    }


    /// <summary>
    /// A test for HeadingModuleConstructorTest1
    /// </summary>
    [Fact]
    public void HeadingModule_Constructor_Default() {
      HeadingModule target = new HeadingModule();

      Assert.True(target.AllowedSurrounded);
      Assert.True(target.AllowedUnderlined);
      Assert.Equal(1, target.Balancing);
      Assert.Equal(1, target.Top);
    }

    /// <summary>
    /// A test for HeadingModuleConstructorTest
    /// </summary>
    [Fact]
    public void HeadingModule_Constructor_NullConfigElement() {
      HeadingModule target = new HeadingModule(null);

      Assert.True(target.AllowedSurrounded);
      Assert.True(target.AllowedUnderlined);
      Assert.Equal(1, target.Balancing);
      Assert.Equal(1, target.Top);
    }
  }
}
